$(function() {
    function log( message ) {
      $( "<div>" ).text( message ).prependTo( "#log" );
      $( "#log" ).scrollTop( 0 );
    }
    id = $("input[name=idCabEdit]").val()
    $( "#AutoComplete" ).autocomplete({
      source: "AutoComplete.php?id="+id,
      minLength: 0,
      focus: function( event, ui ) {
        $("#AutoComplete").val(ui.item.label);
        return false;
      },
      select: function( event, ui ) {
          $("#AutoComplete").val(ui.item.label);
          $("#idPrat").val(ui.item.value);
          return false;
        }
    });

  });